const mongoose = require('mongoose'),
    Schema = mongoose.Schema;

let userSchema = new Schema({
  openid: {
    type: String,
    required: true
  },
  nickname: {
    type: String,
    default: ''
  },
  bankId: {
    type: String,
    default: ''
  },
  bankName: {
    type: String,
    default: ''
  },
  bindBankName: {
    type: String,
    default: ''
  },
  phone: {
    type: String,
    default: ''
  },
  mail: {
    type: String,
    default: ''
  }
}, {versionKey: false, timestamps: true});
module.exports = mongoose.model('user', userSchema);
